<?php
declare (strict_types = 1);
// +----------------------------------------------------------------------
// | 尘墨成 [ DustInk Package ]
// +----------------------------------------------------------------------
// | Copyright (c) 2021~2021 https://www.dustink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 尘墨成 <dustink@sina.com>
// +----------------------------------------------------------------------
// | 创建于2021年09月19日 06:05
// +----------------------------------------------------------------------
// | 格式化工具类
// +----------------------------------------------------------------------

namespace DustInk\Tools;


class Format
{
    /**
     * 数组重新序列化
     * @param array $arr
     * @return array
     */
    static public function restoreArray(array $arr)
    {
        if (!is_array($arr)) {
            return $arr;
        } else {
            $c = 0;
            $newArr = [];
            foreach ($arr as $key => $value) {
                $newArr[$c] = $value;
                $c++;
            }
            return $newArr;
        }
    }
}